package com.jbp.controller;

import java.util.Arrays;
import java.util.Map;


import com.jbp.model.GiftLot;
import com.jbp.service.GiftLotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.jbp.utils.PageUtils;
import com.jbp.utils.R;



/**
 * 奖池列表
 *
 * @author lucheng feng
 * @email retailers@gmail.com
 * @date 2020-06-26 13:49:51
 */
//@RestController
//@RequestMapping("/rest/giftlot")
public class GiftLotController {
    @Autowired
    private GiftLotService giftLotService;

    /**
     * 列表
     */
    @GetMapping("/list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = giftLotService.queryPage(params);

        return R.ok().put("page", page);
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Integer id){
        GiftLot giftLot = giftLotService.getById(id);

        return R.ok().put("giftLot", giftLot);
    }


}
